﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CodeGame.ServerObjects;

namespace CodeGame.Networking.Serverside.ClientServerPackets
{
    class TurnEntityPacket : ServerPacket
    {
        public override ClientServerNet GetID()
        {
            return ClientServerNet.EntityTurnRequest;
        }

        public override void Handle(Lidgren.Network.NetIncomingMessage message, Lidgren.Network.NetConnection sender)
        {
            string id = message.ReadString();

            ServerSingletons.World.GetEntity(true, id).Turn(id);
        }
    }
}
